import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';

class CommitButton extends StatelessWidget {
  final String text;
  final VoidCallback onPressed;

  const CommitButton({Key? key, required this.text, required this.onPressed})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.only(left: 20, right: 20),
      height: 40,
      child: TextButton(
        style: TextButton.styleFrom(
          shape: RoundedRectangleBorder(
            borderRadius: BorderRadius.circular(5.0),
          ),
          minimumSize: Size(10000, 0), // You can adjust the width as needed
          backgroundColor: Colors.green,
        ),
        onPressed: onPressed,
        child: Text(
          text,
          style: TextStyle(
            color: Colors.white, // Text color
            fontSize: 16.0,
          ),
        ),
      ),
    );
  }
}
